<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>mechanoChemIGA: Core functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">mechanoChemIGA
   &#160;<span id="projectnumber">0.2.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="codestructure.html"><span>Code&#160;structure</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li><a href="modules.html"><span>Functions</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="https://github.com/mechanoChem/mechanoChem"><span>GitHub&#160;code&#160;repo</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Core functions</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga08632a46fbc727b23c073844cfcd205a"><td class="memTemplParams" colspan="2">template&lt;unsigned int DIM&gt; </td></tr>
<tr class="memitem:ga08632a46fbc727b23c073844cfcd205a"><td class="memTemplItemLeft" align="right" valign="top">PetscErrorCode&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#ga08632a46fbc727b23c073844cfcd205a">Residual</a> (IGAPoint p, const PetscScalar *U, const PetscScalar *Up, const PetscScalar *Upp, PetscScalar *R, void *ctx)</td></tr>
<tr class="separator:ga08632a46fbc727b23c073844cfcd205a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabe697234628a48d75eaeb63c189930bf"><td class="memTemplParams" colspan="2">template&lt;unsigned int DIM&gt; </td></tr>
<tr class="memitem:gabe697234628a48d75eaeb63c189930bf"><td class="memTemplItemLeft" align="right" valign="top">PetscErrorCode&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#gabe697234628a48d75eaeb63c189930bf">Jacobian</a> (IGAPoint p, const PetscScalar *U, const PetscScalar *Up, const PetscScalar *Upp, PetscScalar *K, void *ctx)</td></tr>
<tr class="separator:gabe697234628a48d75eaeb63c189930bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2638b6094bc6f534e1d4e7e0a35ef801"><td class="memTemplParams" colspan="2">template&lt;class T , unsigned int dim&gt; </td></tr>
<tr class="memitem:ga2638b6094bc6f534e1d4e7e0a35ef801"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#ga2638b6094bc6f534e1d4e7e0a35ef801">ComputeField</a> (<a class="el" href="core_functions_8h.html#ae2c3e99c22ce037f68e9b19bfd9c6de2">fieldType</a> type, unsigned int index, IGAPoint p, const T *U, unsigned int Udof, T *_value=0, T *_grad=0, T *_hess=0)</td></tr>
<tr class="separator:ga2638b6094bc6f534e1d4e7e0a35ef801"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2a8d849923eaa1fd00d8c8d7ea96c121"><td class="memTemplParams" colspan="2">template&lt;unsigned int DIM&gt; </td></tr>
<tr class="memitem:ga2a8d849923eaa1fd00d8c8d7ea96c121"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#ga2a8d849923eaa1fd00d8c8d7ea96c121">Setup</a> (<a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; DIM &gt; &amp;user, Vec *U, Vec *Up, Vec *Upp, SNES &amp;snes)</td></tr>
<tr class="separator:ga2a8d849923eaa1fd00d8c8d7ea96c121"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafa04e2095e7bbf9d7578c60adfc7aa6b"><td class="memTemplParams" colspan="2">template&lt;unsigned int DIM&gt; </td></tr>
<tr class="memitem:gafa04e2095e7bbf9d7578c60adfc7aa6b"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#gafa04e2095e7bbf9d7578c60adfc7aa6b">InitIGA</a> (<a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; DIM &gt; &amp;user, IGA &amp;iga, PetscInt p, PetscInt C, PetscInt DOF)</td></tr>
<tr class="separator:gafa04e2095e7bbf9d7578c60adfc7aa6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20fdc6d97dce38bb3bc3f8f91ba1cade"><td class="memTemplParams" colspan="2">template&lt;unsigned int DIM&gt; </td></tr>
<tr class="memitem:ga20fdc6d97dce38bb3bc3f8f91ba1cade"><td class="memTemplItemLeft" align="right" valign="top">PetscErrorCode&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#ga20fdc6d97dce38bb3bc3f8f91ba1cade">FormInitialCondition</a> (IGA iga, Vec U, <a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; DIM &gt; *user)</td></tr>
<tr class="separator:ga20fdc6d97dce38bb3bc3f8f91ba1cade"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaa30f566761cb94fc5aefe7affc203cc"><td class="memTemplParams" colspan="2">template&lt;class T , unsigned int DIM&gt; </td></tr>
<tr class="memitem:gaaa30f566761cb94fc5aefe7affc203cc"><td class="memTemplItemLeft" align="right" valign="top">PetscErrorCode&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#gaaa30f566761cb94fc5aefe7affc203cc">QuadPtResidual</a> (IGAPoint p, const T *U, const PetscScalar *Up, const PetscScalar *Upp, T *R, void *ctx)</td></tr>
<tr class="separator:gaaa30f566761cb94fc5aefe7affc203cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3a0e7217998b15739effcfa4fbd10842"><td class="memTemplParams" colspan="2">template&lt;int dim&gt; </td></tr>
<tr class="memitem:ga3a0e7217998b15739effcfa4fbd10842"><td class="memTemplItemLeft" align="right" valign="top">PetscErrorCode&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#ga3a0e7217998b15739effcfa4fbd10842">ProjectionResidual</a> (IGAPoint p, const PetscScalar *U, PetscScalar *R, void *ctx)</td></tr>
<tr class="separator:ga3a0e7217998b15739effcfa4fbd10842"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga738a57ea9ef5e08da59957c6df1ee9fe"><td class="memItemLeft" align="right" valign="top">PetscErrorCode&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_functions.html#ga738a57ea9ef5e08da59957c6df1ee9fe">ProjectionJacobian</a> (IGAPoint p, PetscScalar *K, void *ctx)</td></tr>
<tr class="separator:ga738a57ea9ef5e08da59957c6df1ee9fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf0959cd630c816ce9b990d30d3d9e4e6"><td class="memTemplParams" colspan="2">template&lt;int dim&gt; </td></tr>
<tr class="memitem:gaf0959cd630c816ce9b990d30d3d9e4e6"><td class="memTemplItemLeft" align="right" valign="top">PetscErrorCode&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#gaf0959cd630c816ce9b990d30d3d9e4e6">ProjectSolution</a> (IGA iga, PetscInt step, Vec U, <a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; dim &gt; *user)</td></tr>
<tr class="separator:gaf0959cd630c816ce9b990d30d3d9e4e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga143a878f6c274dcd5e8013788380316e"><td class="memTemplParams" colspan="2">template&lt;int dim&gt; </td></tr>
<tr class="memitem:ga143a878f6c274dcd5e8013788380316e"><td class="memTemplItemLeft" align="right" valign="top">PetscErrorCode&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#ga143a878f6c274dcd5e8013788380316e">StepUpdate</a> (PetscInt it_number, PetscReal c_time, Vec U, <a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; dim &gt; &amp;user)</td></tr>
<tr class="separator:ga143a878f6c274dcd5e8013788380316e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad060e37f9337ad9550d899cffe263b34"><td class="memTemplParams" colspan="2">template&lt;int dim&gt; </td></tr>
<tr class="memitem:gad060e37f9337ad9550d899cffe263b34"><td class="memTemplItemLeft" align="right" valign="top">PetscErrorCode&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#gad060e37f9337ad9550d899cffe263b34">Run</a> ()</td></tr>
<tr class="separator:gad060e37f9337ad9550d899cffe263b34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab3d08a587188a4e769f3357d6e7fcd67"><td class="memTemplParams" colspan="2">template&lt;int dim&gt; </td></tr>
<tr class="memitem:gab3d08a587188a4e769f3357d6e7fcd67"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__core_functions.html#gab3d08a587188a4e769f3357d6e7fcd67">ReadParameters</a> (<a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; dim &gt; &amp;user)</td></tr>
<tr class="separator:gab3d08a587188a4e769f3357d6e7fcd67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6fcc3ed2152060628e60a2f8cb41f7ba"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_functions.html#ga6fcc3ed2152060628e60a2f8cb41f7ba">ReadDim</a> ()</td></tr>
<tr class="separator:ga6fcc3ed2152060628e60a2f8cb41f7ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This is a collection of the core functions of the code. These functions do not require modification by the user. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga2638b6094bc6f534e1d4e7e0a35ef801"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ComputeField </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="core_functions_8h.html#ae2c3e99c22ce037f68e9b19bfd9c6de2">fieldType</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IGAPoint&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T *&#160;</td>
          <td class="paramname"><em>U</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>Udof</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>_value</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>_grad</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>_hess</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function using PetIGA to retrieve a the values for a field, the gradients, and the hessians. </p>

</div>
</div>
<a class="anchor" id="ga20fdc6d97dce38bb3bc3f8f91ba1cade"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PetscErrorCode FormInitialCondition </td>
          <td>(</td>
          <td class="paramtype">IGA&#160;</td>
          <td class="paramname"><em>iga</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Vec&#160;</td>
          <td class="paramname"><em>U</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; DIM &gt; *&#160;</td>
          <td class="paramname"><em>user</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Form the initial conditions of the IBVP based on user defined functions. </p>

</div>
</div>
<a class="anchor" id="gafa04e2095e7bbf9d7578c60adfc7aa6b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int InitIGA </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; DIM &gt; &amp;&#160;</td>
          <td class="paramname"><em>user</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IGA &amp;&#160;</td>
          <td class="paramname"><em>iga</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PetscInt&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PetscInt&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PetscInt&#160;</td>
          <td class="paramname"><em>DOF</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function to initilize PetIGA structures. Called in the "setup" function. </p>

</div>
</div>
<a class="anchor" id="gabe697234628a48d75eaeb63c189930bf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PetscErrorCode Jacobian </td>
          <td>(</td>
          <td class="paramtype">IGAPoint&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const PetscScalar *&#160;</td>
          <td class="paramname"><em>U</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const PetscScalar *&#160;</td>
          <td class="paramname"><em>Up</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const PetscScalar *&#160;</td>
          <td class="paramname"><em>Upp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PetscScalar *&#160;</td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ctx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Computes the Jacobian using the residual and Sacado automatic differentiation. </p>

</div>
</div>
<a class="anchor" id="ga738a57ea9ef5e08da59957c6df1ee9fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PetscErrorCode ProjectionJacobian </td>
          <td>(</td>
          <td class="paramtype">IGAPoint&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PetscScalar *&#160;</td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ctx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Compute the jacobiam for the projection fields using Sacado automatic differentiation. </p>

</div>
</div>
<a class="anchor" id="ga3a0e7217998b15739effcfa4fbd10842"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PetscErrorCode ProjectionResidual </td>
          <td>(</td>
          <td class="paramtype">IGAPoint&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const PetscScalar *&#160;</td>
          <td class="paramname"><em>U</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PetscScalar *&#160;</td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ctx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Compute the residual for the projection fields. </p>

</div>
</div>
<a class="anchor" id="gaf0959cd630c816ce9b990d30d3d9e4e6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PetscErrorCode ProjectSolution </td>
          <td>(</td>
          <td class="paramtype">IGA&#160;</td>
          <td class="paramname"><em>iga</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PetscInt&#160;</td>
          <td class="paramname"><em>step</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Vec&#160;</td>
          <td class="paramname"><em>U</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; dim &gt; *&#160;</td>
          <td class="paramname"><em>user</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function to project and output desired fields. </p>

</div>
</div>
<a class="anchor" id="gaaa30f566761cb94fc5aefe7affc203cc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PetscErrorCode QuadPtResidual </td>
          <td>(</td>
          <td class="paramtype">IGAPoint&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T *&#160;</td>
          <td class="paramname"><em>U</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const PetscScalar *&#160;</td>
          <td class="paramname"><em>Up</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const PetscScalar *&#160;</td>
          <td class="paramname"><em>Upp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ctx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This computes the residual at the quadrature point level, calling the userFunction residual. </p>

</div>
</div>
<a class="anchor" id="ga6fcc3ed2152060628e60a2f8cb41f7ba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ReadDim </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function reads the dimension from the parameters file, if it exists. </p>

</div>
</div>
<a class="anchor" id="gab3d08a587188a4e769f3357d6e7fcd67"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ReadParameters </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; dim &gt; &amp;&#160;</td>
          <td class="paramname"><em>user</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function that reads the parameter file, if it exists. </p>

</div>
</div>
<a class="anchor" id="ga08632a46fbc727b23c073844cfcd205a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PetscErrorCode Residual </td>
          <td>(</td>
          <td class="paramtype">IGAPoint&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const PetscScalar *&#160;</td>
          <td class="paramname"><em>U</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const PetscScalar *&#160;</td>
          <td class="paramname"><em>Up</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const PetscScalar *&#160;</td>
          <td class="paramname"><em>Upp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PetscScalar *&#160;</td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ctx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Calls quadPtResidual to compute the residual. </p>

</div>
</div>
<a class="anchor" id="gad060e37f9337ad9550d899cffe263b34"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PetscErrorCode Run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function defining the workflow. </p>

</div>
</div>
<a class="anchor" id="ga2a8d849923eaa1fd00d8c8d7ea96c121"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Setup </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; DIM &gt; &amp;&#160;</td>
          <td class="paramname"><em>user</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Vec *&#160;</td>
          <td class="paramname"><em>U</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Vec *&#160;</td>
          <td class="paramname"><em>Up</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Vec *&#160;</td>
          <td class="paramname"><em>Upp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SNES &amp;&#160;</td>
          <td class="paramname"><em>snes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function to setup data structures, etc </p>

</div>
</div>
<a class="anchor" id="ga143a878f6c274dcd5e8013788380316e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PetscErrorCode StepUpdate </td>
          <td>(</td>
          <td class="paramtype">PetscInt&#160;</td>
          <td class="paramname"><em>it_number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PetscReal&#160;</td>
          <td class="paramname"><em>c_time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Vec&#160;</td>
          <td class="paramname"><em>U</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_app_ctx.html">AppCtx</a>&lt; dim &gt; &amp;&#160;</td>
          <td class="paramname"><em>user</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function to define output. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
